
const reducer = (state = {}, action) => {
	switch (action.type) {
		case 'setUser':
			return {
				...state,
				user: action.user ? action.user : null
			}
		case 'setErrList':
			return {
				...state,
				errors: action.errors ? action.errors : null
			}
		default:
			return state
	}
}

export default reducer
